<%@page import="java.util.List"%>
<%@page import="com.mongodb.DBObject"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script  type="text/javascript"  src ="js/jquery.js"></script>
 <script  type="text/javascript"  src="js/pujs.js"></script>

<link rel="stylesheet" type="text/css" href="css/style.css">


<link  rel="stylesheet" type="text/css" href="css/header.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>

</head>
<body>
<div class="menu">
    <ul>
      <li><img id="tubiao" src="images/tubiao.png" alt="HPU比特能"/></li>
      <li class="current"><a href="#"></a></li>
      <li><a href="javascript:void(0)" style="margin-left:30px;">基于智能计算的信息推荐系统</a></li>
    </ul>
    <div class="sousuo">
     <form  role="form" class="form" id="form">
      <div class="col-sm-6">
         <input type="text"  class="form-control" id="inputInfo"  placeholder="输入专家姓名" >
      </div>
       <button type="button" class="btn btn-default" id="btn_cha" onclick="javascript:void(0)">查询</button>
    </form>
   </div>
  </div>
<div id="content">
<%
List<DBObject> list=(List<DBObject>)request.getAttribute("list");
	if(list!=null)
	{		
%>


<div id="container">	
	<div class="box">
			<div class="box_img">	
				<ul>
					<li>
						<span>专利名称:</span><%=list.get(0).get("title")%>
					</li>
					<li>
						<span>专利公开日:</span><%=list.get(0).get("date")%>
					</li>
					<li>
						<span>专利摘要:</span><%=list.get(0).get("abs")%>
					</li>
					<li>
						<span>申请人:</span><%=list.get(0).get("applicant")%>
					</li>
					<li>
						<span>作者:</span><%=list.get(0).get("inventor")%>
					</li>
					<li>
						<span>专家姓名:</span><%=list.get(0).get("expert_name")%>
					</li>
					<li>
						<span>专家机构:</span><%=list.get(0).get("expert_org")%>
					</li>
				</ul>
			
			</div>			
		</div>		

	</div>
</div>
<!-- 内容结束-->
<script type="text/javascript">

window.onload=function(){
 imglocation('container','box');
 var i=0;
 var listdata={"list":<%=list%>};

 	if(i<listdata.list.length)//加载数据
  	{
  		var cparent=document.getElementById('container');
  	
  		for(i=1;i<listdata.list.length;i++)
  		{
  			var ccontent=document.createElement("div");
  			ccontent.className="box";
  			cparent.appendChild(ccontent);

  			var boximg=document.createElement('div');
  			boximg.className="box_img";
  			ccontent.appendChild(boximg);
  			
  			var ul =document.createElement('ul');
  			boximg.appendChild(ul);
  			
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("专利标题:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].title));
  			ul.appendChild(li);
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("专利公开日:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].date));
  			ul.appendChild(li);
  			
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("专利摘要:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].abs));
  			ul.appendChild(li);
  		
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("申请人:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].applicant));
  			ul.appendChild(li);
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("作者:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].inventor));
  			ul.appendChild(li);
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("专家名字:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].expert_name));
  			ul.appendChild(li);
  			
  			var li=document.createElement('li');
  			var span =document.createElement('span');
  			span.appendChild(document.createTextNode("专家机构:"));
  			li.appendChild(span);
  			li.appendChild(document.createTextNode(listdata.list[i].expert_org));
  			ul.appendChild(li);
   		
  		}
  		imglocation('container','box');
  	}	
  }
</script>
<%		
}else
{
	%>
	 <h3 id="h3">没有信息了哦^o^！</h3>
	<% 
}
%>
<div id="foolter">
 hpuacm&copy;版权所有
</div>

</body>
</html>